<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../../v2/common/jspcommon.jsp"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
%> 
<script type="text/javascript">
	$(function(){
		$(".h_page").pager(
				{
					pagenumber : '${pageModel.currentPage}',
					pagecount : '${pageModel.totalPage}',
					buttonClickCallback : function(page) {
						$(".h_page").hide();
						$("#div_doing_stat").html("<font color=red>数据加载中......</font>");
						$("#div_doing_stat").load("/misc/audit/doingStatSearch.htm",{
							startTime:"${startTime}",
					  		endTime:"${endTime}",
					  		pageSize:"${pageSize}",
					  		orderBy:"${orderBy}",
					  		sort:"${sort}",
					  		type:"${type}",
							page:page,
						},function(){
							$("#page").show();
						});
					}
				});
	});
</script>
<style>
.statres td,.statres th{
padding: 10px;
}

</style>
<div>
<c:if test="${not empty pageModel.list }">
	<table border="1" class="statres">
	<tr>
		<th>家id</th>
		<th>发稿人</th>
		<th><c:if test="${type=='posts' }">稿件</c:if><c:if test="${type=='picRoot' }">画报</c:if>标题</th>
		<th>IPC(ip点击数)</th>
		<th>回复数</th>
		<th>发稿时间</th>
		<th>发稿IP</th>
	</tr>
	<c:forEach items="${pageModel.list }" var="doing"> 
	<tr>
		<td>${doing.owner }</td>
		<td>${doing.memberName }</td>
		<td>
			<c:if test="${type=='posts' }"><a href="../forumDc.htm?id=${doing.identifier }" target="_bank">${doing.title }</a></c:if>
			<c:if test="${type=='picRoot' }"><a href="../picdt.htm?id=${doing.identifier }&family=${doing.owner}" target="_bank">${doing.title }</a></c:if>
		</td>
		<td>${doing.totalIPViewCount }</td>
		<td>
			<c:if test="${type=='posts' }">${doing.replyAmount }</c:if>
			<c:if test="${type=='picRoot' }">${doing.commentCount }</c:if>
		</td>
		<td><fmt:formatDate value="${doing.gmtCreated }" pattern="yyyy年MM月dd日 hh:mm:ss"/></td>
		<td>${doing.postIp }</td>
	</tr>
	</c:forEach>
	</table>
</c:if>
<c:if test="${pageModel.totalPage>1}">
		<div id="page" class="h_page"></div>
	</c:if>
</div>

